<!DOCTYPE html>
<!--把html 的名称空间，改成：xmlns:th="http://www.thymeleaf.org" 会有语法提示-->
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:easyui="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
    <title>人员编辑</title>
    <script type="text/javascript" src="../../static/easyui/boot.js" th:src="@{/static/easyui/boot.js}"></script>
</head>
<body>
<div class="pt-info container">
<form id="frmMain" class="form-horizontal" method="post" style="margin: 50px 0;">
    <div class="pt-content row">
        <easyui:hidden name="id" vtype="text" th:value="${entity?.id}"/>
        <easyui:input label="登录账号" name="code" vtype="text" required="true" readonly="false" th:value="${entity?.code}" width="col-md-10"/>
        <easyui:input label="用户名" name="name" vtype="text" required="true" readonly="false" th:value="${entity?.name}" width="col-md-10"/>
        <easyui:input label="手机号" name="mobile" vtype="int" required="true" readonly="false" th:value="${entity?.mobile}" min="0" width="col-md-10"/>
        <easyui:input label="密码" name="password" vtype="password" required="true" readonly="false" th:value="${entity?.password}"  width="col-md-10"/>
        <easyui:input label="确认密码" name="passwordOk" vtype="password" required="true" readonly="false" th:value="${entity?.password}"  width="col-md-10"/>
    </div>

    <div class="pt-tool row">
        <easyui:button label="保存" vtype="save" name="butSave" plain="fasle" onclick="save()"/>
        <easyui:button label="关闭" vtype="close" name="butClose"  plain="fasle" onclick="windowsClose()"/>
    </div>
</form>
</div>
</body>
</html>
<script type="text/javascript">
    $(document).ready(function () {

    });

    //保存
    function save() {
        if($("#password").val()!=$("#passwordOk").val()){
            showAlert('警告','2次输入的密码不一致!',"warning");
        }else{
            formSubmit("frmMain","/sysAccount/save.do",function(e){
                showAlert('信息',e.result,"info",function () {
                    windowsClose();
                });
            });
        }
    }
</script>